package edu.spec.wfl.week09.class2.classroom;

import java.util.ArrayList;
import java.util.List;

public class ListTest {
    public static void main(String[] args) {
       /* List l=new ArrayList();
        Student s1=new Student("s1","1111");
        Student s2=new Student("s2","2222");
        Student s3=new Student("s3","3333");
        Student s4=new Student("s4","4444");
        Student s5=new Student("s5","5555");
        Student s6=new Student("s6","6666");
        Student sa=new Student("sa","aaaa");
        Student sb=new Student("sb","bbbb");
        Student sc=new Student("sc","cccc");
        l.add(s1);
        l.add(s2);
        l.add(s3);
        l.add(s4);
        l.add(s5);
        l.add(s6);
        l.add(sa);
        l.add(sb);
        l.add(sc);
        for (int i=0;i<l.size();i++){
            Student s=(Student)l.get(i);
            System.out.println(s.getName());
        }
    }
    */
        List al=new ArrayList();
        Student sa=new Student("sa","aaaa");
        Student sb=new Student("sb","bbbb");
        Student sc=new Student("sc","cccc");
        al.add(sa);
        al.add(sb);
        al.add(sc);
        List l=new ArrayList();
        Student s1=new Student("s1","1111");
        Student s2=new Student("s2","2222");
        Student s3=new Student("s3","3333");
        Student s4=new Student("s4","4444");
        Student s5=new Student("s5","5555");
        Student s6=new Student("s6","6666");
        l.addAll(al);
        l.add(s1);
        l.add(s2);
        l.add(s3);
        l.add(s4);
        l.add(s5);
        l.add(s6);
        try {
            s6.study(4);
            s6.study(5);
        }
        catch (Exception e){
            e.printStackTrace();
        }
        System.out.println("ye");
        /*
        for (int i=0;i<l.size();i++){
            Student s=(Student)l.get(i);
            System.out.println(s.getName());
        }
        System.out.println(l.size());

        try {
           Student s=(Student)
        }
        catch (Exception e){
            System.out.println(e.toString());
        }
        System.out.println("YE");
        */
        }

}
